package com.uchedao.seller.ui.car.publish.fragment;

import android.content.Intent;
import android.widget.LinearLayout;

import com.uchedao.seller.R;
import com.uchedao.seller.inf.IOnResultBack;
import com.uchedao.seller.ui.baidu.BaseFragForBaidu;
import com.uchedao.seller.ui.car.publish.ICallback;
import com.uchedao.seller.ui.car.publish.accident.AccidentCoverView;

/**
 * 覆盖件
 * Created by hang on 2015/10/25.
 */
public class AccidentCoverFragment extends BaseFragForBaidu implements ICallback {

    private AccidentCoverView contentView;

    @Override
    protected String getActivityTag() {
        return "AccidentCoverFragment";
    }

    @Override
    public int getViewLayoutId() {
        return R.layout.fragment_test_content;
    }

    @Override
    public void initView() {
        contentView = new AccidentCoverView(getActivity());
        ((LinearLayout)mRoot).addView(contentView);
    }

    @Override
    public void initListener() {

    }

    @Override
    public void initData() {

    }

    public boolean save() {
        if(contentView == null)
            return false;

        return contentView.save();
    }

    @Override
    public boolean noEmptyTerm() {
        return contentView.noEmptyTerm();
    }

    @Override
    public void checkAllOk() {
        contentView.checkAllOk();
    }

    public void onActivityResult(int requestCode, int resultCode, Intent data) {
        ((IOnResultBack) contentView).onActivityResultView(requestCode, resultCode, data);
    }
}
